package main

import (
	"github.com/spf13/pflag"
	"github.com/spf13/viper"
)

func main() {
	//
	InitViper()
	app := InitAPP()
	server := app.Server
	server.Start()
}

func InitViper() {
	cfile := pflag.String("config", "config/dev.yaml", "config file path")
	pflag.Parse()
	viper.SetConfigFile(*cfile)
	err := viper.ReadInConfig()
	if err != nil {
		panic(err)
	}

}
